<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Identicon.WebDemo._Default" %>
<%@ Import namespace="Docuverse.Identicon"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
		<p>The following Identicon is for the IP Address <%= Request.UserHostAddress %>.</p>
		<p>
			<img src="IdenticonHandler.ashx?code=<%= IdenticonUtil.Code(Request.UserHostAddress) %>&amp;size=80" />
		</p>
		<p>
			The basic idea is to store the user&#8217;s Identicon code in your database 
			and use that when it is time to render the user&#8217;s identicon glyph.
		</p>
		<p>
			To generate the user&#8217;s identicon call the following:
			<blockquote>
				<code>
					int code = IdenticonUtil.Code(Request.UserHostAddress);
				</code>
			</blockquote>
		</p>
		<p>
			Then one <em>possible</em> way to display the user&#8217;s identicon is:
			<blockquote>
				<code>
					&lt;img src="IdenticonHandler.ashx?code=&lt;%= GetCodeFromDb(CurrentUser) %&gt;&amp;amp;size=80" /&gt;
				</code>
			</blockquote>
		</p>
		<p>
			In order to provide a preview for the current user, do something like this:
			<blockquote>
				<code>
					&lt;img src="IdenticonHandler.ashx?code=&lt;%= IdenticonUtil.Code(Request.UserHostAddress) %&gt;&amp;amp;size=80" /&gt;
				</code>
			</blockquote>
		</p>
		<h2>Identicon Test Page</h2>
		<a href="identicon-tests.htm">Identicon Tests</a>
    </div>
    </form>
</body>
</html>
